package com.t9;

import static net.mindview.util.Print.print;

/**
 * Created by xuyiwei on 2018/7/20.
 */
interface FastFood{
    void print1();
}

class Meal implements FastFood{
    Meal() { print1(); }

    @Override
    public void print1() {
        print("Meal()");
    }
}

class Bread implements FastFood{
    Bread() { print1(); }

    @Override
    public void print1() {
        print("Bread()");
    }
}

class Cheese implements FastFood{
    Cheese() { print1(); }

    @Override
    public void print1() {
        print("Cheese()");
    }
}

class Lettuce implements FastFood{
    Lettuce() { print1(); }

    @Override
    public void print1() {
        print("Lettuce()");
    }
}

class Lunch extends Meal  {
    Lunch() { print1(); }

    @Override
    public void print1() {
        print("Lunch()");
    }
}

class PortableLunch extends Lunch {
    PortableLunch() { print1();}
    @Override
    public void print1() {
        print("PortableLunch()");
    }
}

public class E8 extends PortableLunch {
    private Bread b = new Bread();
    private Cheese c = new Cheese();
    private Lettuce l = new Lettuce();
    public E8() { print("Sandwich()"); }
    public static void main(String[] args) {
        new E8();
    }
    /**
     * Meal()
     Lunch()
     PortableLunch()
     Bread()
     Cheese()
     Lettuce()
     Sandwich()
     */
}


